const PREFIX = '/admin/{{ table_name }}'
import request from '@/request/request.js'

/**
 * 获取{{ table_comment }}列表
 * @returns {*}
 */
export const get{{ class_name }}List = (params) => request(`${PREFIX}`,params, 'get')

/**
 * 添加{{ table_comment }}
 * @param data 表单数据
 * @returns {*}
 */
export const add{{ class_name }} = (data) => request(`${PREFIX}`, data, 'post')

/**
 * 获取{{ table_comment }}
 * @returns {*}
 * @param id
 */
export const get{{ class_name }}ById = (id) => request(`${PREFIX}/${id}`)

/**
 * 修改{{ table_comment }}
 * @param data 表单数据
 * @returns {*}
 */
export const update{{ class_name }} = (data) => request(`${PREFIX}`, data, 'put')

/**
 * 删除{{ table_comment }}
 * @returns {*}
 * @param id
 */
export const delete{{ class_name }} = (id) => request(`${PREFIX}/${id}`, null, 'delete')
